.class public final Llt/farmis/libraries/apps_promo/AppsPromo;
.super Ljava/lang/Object;
.source "AppsPromo.kt"


# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nAppsPromo.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AppsPromo.kt\nlt/farmis/libraries/apps_promo/AppsPromo\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,147:1\n1497#2,2:148\n*E\n*S KotlinDebug\n*F\n+ 1 AppsPromo.kt\nlt/farmis/libraries/apps_promo/AppsPromo\n*L\n101#1,2:148\n*E\n"
.end annotation


# instance fields
.field private final activity:Landroidx/appcompat/app/AppCompatActivity;

.field private final prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;


# direct methods
.method public constructor <init>(Landroidx/appcompat/app/AppCompatActivity;Ljava/lang/String;IZZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IJLjava/lang/String;II)V
    .locals 10

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object/from16 v3, p6

    move-object/from16 v4, p7

    move-object/from16 v5, p8

    move-object/from16 v6, p9

    move-object/from16 v7, p10

    move-object/from16 v8, p14

    const-string v9, "activity"

    invoke-static {p1, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "dialogTitle"

    invoke-static {p2, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "mainImageUrl"

    invoke-static {v3, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "smallImageUrl"

    invoke-static {v4, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "appTitle"

    invoke-static {v5, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "appDescription"

    invoke-static {v6, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "packageName"

    invoke-static {v7, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v9, "videoId"

    invoke-static {v8, v9}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 20
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v1, v0, Llt/farmis/libraries/apps_promo/AppsPromo;->activity:Landroidx/appcompat/app/AppCompatActivity;

    .line 38
    new-instance v1, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    iget-object v9, v0, Llt/farmis/libraries/apps_promo/AppsPromo;->activity:Landroidx/appcompat/app/AppCompatActivity;

    invoke-direct {v1, v9}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;-><init>(Landroid/content/Context;)V

    iput-object v1, v0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    .line 41
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, p2}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setDialogTitle(Ljava/lang/String;)V

    .line 42
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move v2, p3

    invoke-virtual {v1, p3}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setDialogHeaderColor(I)V

    .line 43
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move v2, p4

    invoke-virtual {v1, p4}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setSingleAppCampaign(Z)V

    .line 44
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move v2, p5

    invoke-virtual {v1, p5}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setVideoCampaign(Z)V

    .line 45
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, v8}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setVideoId(Ljava/lang/String;)V

    .line 46
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, v3}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setMainImageUrl(Ljava/lang/String;)V

    .line 47
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, v4}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setSmallImageUrl(Ljava/lang/String;)V

    .line 48
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, v5}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setAppTitle(Ljava/lang/String;)V

    .line 49
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, v6}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setAppDescription(Ljava/lang/String;)V

    .line 50
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1, v7}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setAppPackageName(Ljava/lang/String;)V

    .line 51
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move/from16 v2, p11

    invoke-virtual {v1, v2}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setOpenCount(I)V

    .line 52
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move-wide/from16 v2, p12

    invoke-virtual {v1, v2, v3}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setMinTime(J)V

    .line 53
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move/from16 v2, p15

    invoke-virtual {v1, v2}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setShowCount(I)V

    .line 54
    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    move/from16 v2, p16

    invoke-virtual {v1, v2}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->setCampaignId(I)V

    return-void
.end method

.method private final filterAppList(Ljava/util/List;Landroid/content/Context;)Ljava/util/List;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Llt/farmis/libraries/apps_promo/models/AppPromoModel;",
            ">;",
            "Landroid/content/Context;",
            ")",
            "Ljava/util/List<",
            "Llt/farmis/libraries/apps_promo/models/AppPromoModel;",
            ">;"
        }
    .end annotation

    .line 99
    invoke-virtual {p2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object p2

    .line 100
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 148
    invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/farmis/libraries/apps_promo/models/AppPromoModel;

    .line 103
    :try_start_0
    invoke-virtual {v1}, Llt/farmis/libraries/apps_promo/models/AppPromoModel;->getAppPackageName()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {p2, v2, v3}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 105
    :catch_0
    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method private final isNetworkConnected()Z
    .locals 2

    .line 144
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->activity:Landroidx/appcompat/app/AppCompatActivity;

    const-string v1, "connectivity"

    invoke-virtual {v0, v1}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_1

    check-cast v0, Landroid/net/ConnectivityManager;

    .line 145
    invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0

    .line 144
    :cond_1
    new-instance v0, Lkotlin/TypeCastException;

    const-string v1, "null cannot be cast to non-null type android.net.ConnectivityManager"

    invoke-direct {v0, v1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method private final needToShow()Z
    .locals 5

    .line 134
    invoke-direct {p0}, Llt/farmis/libraries/apps_promo/AppsPromo;->isNetworkConnected()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {v0}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->getOpenCounter()I

    move-result v0

    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getOpenCount()I

    move-result v1

    if-le v0, v1, :cond_0

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {v0}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->getOpenedTimes()Ljava/lang/Integer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    sget-object v1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getShowCount()I

    move-result v1

    invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->compare(II)I

    move-result v0

    if-gez v0, :cond_0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iget-object v2, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {v2}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->getLastShownTime()Ljava/lang/Long;

    move-result-object v2

    const-string v3, "prefs.getLastShownTime()"

    invoke-static {v2, v3}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    sub-long/2addr v0, v2

    sget-object v2, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v2}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getMinTimeInMillsPassed()J

    move-result-wide v2

    cmp-long v4, v0, v2

    if-lez v4, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method private final setupBeforeShow()V
    .locals 3

    .line 138
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->setLastShownTime(J)V

    .line 139
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {v0}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->increaseOpenedTimeCounter()V

    return-void
.end method


# virtual methods
.method public final show(Ljava/util/List;ZLlt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)Z
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Llt/farmis/libraries/apps_promo/models/AppPromoModel;",
            ">;Z",
            "Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;",
            ")Z"
        }
    .end annotation

    const-string v0, "advertisedAppList"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "callbacks"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 61
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->activity:Landroidx/appcompat/app/AppCompatActivity;

    invoke-virtual {v0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    .line 62
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object v1

    const-string v2, "AppsPromoDialog"

    .line 63
    invoke-virtual {v0, v2}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;

    move-result-object v3

    if-eqz v3, :cond_0

    .line 64
    invoke-virtual {v1, v3}, Landroidx/fragment/app/FragmentTransaction;->remove(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;

    .line 65
    :cond_0
    invoke-virtual {v1}, Landroidx/fragment/app/FragmentTransaction;->commit()I

    .line 66
    new-instance v1, Llt/farmis/libraries/apps_promo/AppsPromoDialog;

    invoke-direct {v1}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;-><init>()V

    .line 67
    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->setAppsModelList(Ljava/util/List;)V

    .line 68
    invoke-virtual {v1, p2}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->setShowDescriptions(Z)V

    .line 69
    invoke-virtual {v1, p3}, Llt/farmis/libraries/apps_promo/AppsPromoDialog;->setCallbacks(Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)V

    .line 70
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object p1

    invoke-virtual {p1, v1, v2}, Landroidx/fragment/app/FragmentTransaction;->add(Landroidx/fragment/app/Fragment;Ljava/lang/String;)Landroidx/fragment/app/FragmentTransaction;

    invoke-virtual {p1}, Landroidx/fragment/app/FragmentTransaction;->commitAllowingStateLoss()I

    const/4 p1, 0x1

    return p1
.end method

.method public final showIf(Ljava/util/List;ZLlt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;Landroid/content/Context;)Z
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Llt/farmis/libraries/apps_promo/models/AppPromoModel;",
            ">;Z",
            "Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;",
            "Landroid/content/Context;",
            ")Z"
        }
    .end annotation

    const-string v0, "advertisedAppList"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "callbacks"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "context"

    invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 115
    invoke-direct {p0, p1, p4}, Llt/farmis/libraries/apps_promo/AppsPromo;->filterAppList(Ljava/util/List;Landroid/content/Context;)Ljava/util/List;

    move-result-object p1

    .line 117
    sget-object p4, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p4}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getCampaignId()I

    move-result p4

    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {v0}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->getCampaignId()Ljava/lang/Integer;

    move-result-object v0

    const-string v1, "prefs.getCampaignId()"

    invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->compare(II)I

    move-result p4

    if-lez p4, :cond_0

    .line 118
    iget-object p4, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    sget-object v0, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v0}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getCampaignId()I

    move-result v0

    invoke-virtual {p4, v0}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->setCampaignId(I)V

    .line 119
    iget-object p4, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {p4}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->resetAllPref()V

    .line 121
    :cond_0
    iget-object p4, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->prefs:Llt/farmis/libraries/apps_promo/AppsPromoPrefs;

    invoke-virtual {p4}, Llt/farmis/libraries/apps_promo/AppsPromoPrefs;->increaseOpenCounter()V

    .line 122
    sget-object p4, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p4}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->isSingleAppCampaign()Z

    move-result p4

    if-eqz p4, :cond_1

    invoke-direct {p0}, Llt/farmis/libraries/apps_promo/AppsPromo;->needToShow()Z

    move-result p4

    if-eqz p4, :cond_1

    .line 123
    invoke-direct {p0}, Llt/farmis/libraries/apps_promo/AppsPromo;->setupBeforeShow()V

    .line 124
    invoke-virtual {p0, p3}, Llt/farmis/libraries/apps_promo/AppsPromo;->showSingleApp(Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)Z

    move-result p1

    return p1

    .line 125
    :cond_1
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result p4

    if-nez p4, :cond_2

    invoke-direct {p0}, Llt/farmis/libraries/apps_promo/AppsPromo;->needToShow()Z

    move-result p4

    if-eqz p4, :cond_2

    .line 126
    invoke-direct {p0}, Llt/farmis/libraries/apps_promo/AppsPromo;->setupBeforeShow()V

    .line 127
    invoke-virtual {p0, p1, p2, p3}, Llt/farmis/libraries/apps_promo/AppsPromo;->show(Ljava/util/List;ZLlt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)Z

    move-result p1

    return p1

    :cond_2
    const/4 p1, 0x0

    return p1
.end method

.method public final showSingleApp(Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)Z
    .locals 3

    const-string v0, "callbacks"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 75
    iget-object v0, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->activity:Landroidx/appcompat/app/AppCompatActivity;

    invoke-virtual {v0}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v0

    .line 76
    invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object v1

    const-string v2, "AppsPromoDialog"

    .line 77
    invoke-virtual {v0, v2}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 78
    invoke-virtual {v1, v2}, Landroidx/fragment/app/FragmentTransaction;->remove(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;

    .line 79
    :cond_0
    invoke-virtual {v1}, Landroidx/fragment/app/FragmentTransaction;->commit()I

    .line 80
    new-instance v1, Llt/farmis/libraries/apps_promo/AppPromoDialog;

    invoke-direct {v1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;-><init>()V

    .line 81
    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setCallbacks(Llt/farmis/libraries/apps_promo/parent_interfaces/Callbacks;)V

    .line 82
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getMainImageUrl()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setBigImageUrl(Ljava/lang/String;)V

    .line 83
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getSmallImageUrl()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setSmallImageUrl(Ljava/lang/String;)V

    .line 84
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getAppTitle()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setTitle(Ljava/lang/String;)V

    .line 85
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getAppDescription()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setDescription(Ljava/lang/String;)V

    .line 86
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getAppPackageName()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setPackageName(Ljava/lang/String;)V

    .line 87
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->isVideoCampaign()Z

    move-result p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setVideoCampaign(Z)V

    .line 88
    sget-object p1, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {p1}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getVideoId()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Llt/farmis/libraries/apps_promo/AppPromoDialog;->setVideoId(Ljava/lang/String;)V

    .line 89
    iget-object p1, p0, Llt/farmis/libraries/apps_promo/AppsPromo;->activity:Landroidx/appcompat/app/AppCompatActivity;

    invoke-static {p1}, Lcom/bumptech/glide/Glide;->with(Landroidx/fragment/app/FragmentActivity;)Lcom/bumptech/glide/RequestManager;

    move-result-object p1

    sget-object v2, Llt/farmis/libraries/apps_promo/AppsPromoConf;->INSTANCE:Llt/farmis/libraries/apps_promo/AppsPromoConf;

    invoke-virtual {v2}, Llt/farmis/libraries/apps_promo/AppsPromoConf;->getMainImageUrl()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1, v2}, Lcom/bumptech/glide/RequestManager;->load(Ljava/lang/String;)Lcom/bumptech/glide/RequestBuilder;

    move-result-object p1

    new-instance v2, Llt/farmis/libraries/apps_promo/AppsPromo$showSingleApp$1;

    invoke-direct {v2, v1, v0}, Llt/farmis/libraries/apps_promo/AppsPromo$showSingleApp$1;-><init>(Llt/farmis/libraries/apps_promo/AppPromoDialog;Landroidx/fragment/app/FragmentManager;)V

    invoke-virtual {p1, v2}, Lcom/bumptech/glide/RequestBuilder;->into(Lcom/bumptech/glide/request/target/Target;)Lcom/bumptech/glide/request/target/Target;

    const/4 p1, 0x1

    return p1
.end method
